package com.tellhow.monitorserverqh.task;

import com.tellhow.monitorserverqh.service.IMonitorServer;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

/**
 * @Author:gnplum
 * @Date: 2023/4/25  23:55
 * @Version 1.0
 */
@Service
public class MonitorServerTask {
    private static final Log logger = LogFactory.getLog(MonitorServerTask.class);

    @Autowired
    IMonitorServer iMonitorServer;

    //定时10min/次
    //@Scheduled(fixedRate = 600 * 1000)
    public void run() {
        logger.info(">> 定时器开始....");
        iMonitorServer.runMonitorServer();
        logger.info(">> 定时器结束！！！");
    }
}
